package com.lbmb.photodrawaimanager.service.impl;

import com.lbmb.photodrawaimanager.entity.dto.PhotoUserUploadEntity;
import com.lbmb.photodrawaimanager.service.ImgOperationService;
import com.lbmb.photodrawaimanager.service.PhotoUserDownLoadService;
import com.lbmb.photodrawaimanager.service.PhotoUserUploadService;
import com.lbmb.photodrawaimanager.utils.OssUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;

/**
 * @author hanWang
 * @Title:
 * @Package
 * @Description:
 * @date 2023/8/62:09 上午
 */
@Service
public class ImgOperationServiceImpl implements ImgOperationService {
    @Autowired
    private OssUtils ossUtils;
    @Autowired
    private PhotoUserUploadService userUploadService;
    @Autowired
    private PhotoUserDownLoadService photoUserDownLoadService;

    @Override
    public Long mangaStyle(MultipartFile file, Long sourceId) {
        // 需要返回上传的数据id 和下载的用户id
//        String fileUrl = ossUtils.uploadOneFile(file);
//        Long userUploadId =  userUploadService.insert(fileUrl,sourceId,file);
//        Long downLoad =photoUserDownLoadService.insert(userUploadId,sourceId);
//        Long downLoad1 =photoUserDownLoadService.uploadById(downLoad,sourceId,fileUrl);
//        return userUploadId;
        return null;
    }
}
